Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Manhattan distances from trade routes #2094

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

lmoureaux
Copy link
Contributor

The Manhattan distance is |deltaX| + |deltaY|, which only makes sense when you can't move in diagonal. Since caravans can use the diagonal, the "Euclidian" (shortest path) distance is better suited for trade routes.

This introduces an incompatibility by changing (lowering) trade revenue for rulesets currently using CLASSIC. Since trade routes are usually OP, I don't think this is a big deal.

Closes #882.

The CLASSIC trade route revenue style was using map_distance() which is the
Manhattan distance. Using Euclidian makes much more sense since this is how
units move.

Closes longturn#882.
@lmoureaux lmoureaux requested a review from jwrober December 27, 2023 04:57
Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lmoureaux lmoureaux merged commit cdf3ea3 into longturn:master Dec 27, 2023
19 checks passed
@lmoureaux lmoureaux deleted the bugfix/trade-routes-distance branch December 27, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLASSIC caravan revenue style uses a weird distance
2 participants